// 登录注册路由
// 导入express 
const express = require('express')
const Joi = require('joi')
// 使用express框架路由
const router = express.Router()

//导入路由模块
const loginHandle = require('../router_handle/login.js')
//导入expreJoi
const expressJoi = require('@escook/express-joi')
//导入验证规则
const {
	login_limit
} = require('../limit/login.js')

//注册
router.post('/register',expressJoi(login_limit),loginHandle.register)
//登录
router.post('/login',expressJoi(login_limit),loginHandle.login)
//向外暴露路由
module.exports = router